treeview: Don't handle clicks on any child widgets
authorAlexander Mikhaylenko <alexm@gnome.org>
Wed, 2 Jun 2021 08:45:11 +0000 (13:45 +0500)
committerAlexander Mikhaylenko <alexm@gnome.org>
Wed, 2 Jun 2021 08:49:11 +0000 (13:49 +0500)
We already skip them on the edited cell widget, but it's also a problem for
header buttons. Overall, there's no real reason to let it propagate here.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3996

gtk/gtktreeview.c

index 5ee23dea7c367206b48051576f057657c3162821..bf8b05a435ee0508abda232ab7aef72cd2f20eac 100644 (file)
@@ -2767,9 +2767,9 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
   gboolean rtl;
   GtkWidget *target;
 
-  /* check if this is a click in an editing widget */
+  /* check if this is a click in a child widget */
   target = gtk_event_controller_get_target (GTK_EVENT_CONTROLLER (gesture));
-  if (priv->edited_column && gtk_widget_is_ancestor (target, widget))
+  if (gtk_widget_is_ancestor (target, widget))
     return;
 
   gtk_tree_view_stop_editing (tree_view, FALSE);